﻿using System;
using System.Windows.Input;
using ClientOverflow.DataTransferObjects;
using ClientOverflow.ViewModels.MainMenus;
using ClientOverflow.ViewModels.UsersListViewModels;

namespace ClientOverflow.ViewModels.UserProfileViewModels
{
    internal class ShowUsersCommand : ICommand
    {
        private readonly Tag tag;
        private readonly IMenusViewModel viewModel;

        public ShowUsersCommand(Tag tag, IMenusViewModel viewModel)
        {
            this.tag = tag;
            this.viewModel = viewModel;
        }

        public void Execute(object parameter)
        {
            viewModel.Content = new UsersListViewModel(tag);
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;
    }
}